﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.MailSentItems" Title=""
    StylesheetTheme="SkinFile" Codebehind="MailSentItems.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, MailSentItems_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="MessagesUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div class="basic_element">
        <div class="red_title">
           <asp:Label ID="PageTitleLabel" runat="server" Text="<%$ Resources:Resource, MailSentItems_PageNameLabel %>" CssClass="white_title"></asp:Label>
        </div>
        <div class="padding5">
            <asp:Label ID="RedInfoLabel" runat="server" SkinID="RedSmallHeaderLabel"></asp:Label>
            <br />
            <asp:Button ID="DeleteAllButton" runat="server" Text="<%$ Resources:Resource, Global_DeleteAll %>"
            CssClass="GreenSmallButtonStyle" OnClientClick='return confirm(this.getAttribute("<%$ Resources:Resource, InternalTeamMessages_DeleteAllButtonOnClientClick %>"))' OnClick="DeleteAll"   />
            &nbsp;
            <asp:Button ID="DeleteSelectedButton" runat="server" Text="<%$ Resources:Resource, InternalTeamMessages_DeleteSelectedButtonText %>"
                CssClass="GreenSmallButtonStyle" OnClientClick='return confirm(this.getAttribute("<%$ Resources:Resource, InternalTeamMessages_DeleteSelectedButtonOnClientClick %>"))' OnClick="DeleteSelected" />                
            &nbsp;
            <asp:HyperLink ID="InboxHyperlink" runat="server" SkinID="GreenTitleHyperLink" NavigateUrl="~/MailInbox.aspx"
                     Text="<%$ Resources:Resource, Global_Inbox %>"></asp:HyperLink>
            <br /><br />
            
            <asp:UpdateProgress ID="MessagesUpdatePanelProgress" runat="server" AssociatedUpdatePanelID="MessagesUpdatePanel">
                <ProgressTemplate>
                    <div class="ajaxloader">
                        <asp:Image ID="MessagesUpdatePanelProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                    </div> 
                </ProgressTemplate>
            </asp:UpdateProgress>                    
            
            <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
                SkinID="Professional" AutoGenerateColumns="False"
                AllowPaging="True" PageSize="20">
                <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                    Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
                <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
                <Columns>
                    <asp:TemplateField HeaderText="Date" ItemStyle-Width="20%">
                        <ItemTemplate>
                            <asp:HyperLink ID="DateHyperlink" runat="server" Text='<%# Eval("Date")%>' Font-Bold='<%# Eval("IsNotRead") %>'
                                NavigateUrl='<%# Eval("MailId", "MailMessage.aspx?MailId={0}") %>' SkinID="BlackHyperLinkSkin">
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="SubjectLabel" runat="server" Text="<%$ Resources:Resource, Global_Subject %>"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="SubjectHyperlink" runat="server" Text='<%# Eval("Subject") %>'
                                NavigateUrl='<%# Eval("MailId", "MailMessage.aspx?MailId={0}") %>' Font-Bold='<%# Eval("IsNotRead") %>'
                                SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="ToLabel" runat="server" Text="<%$ Resources:Resource, Global_To %>"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="ToHyperlink" runat="server" Text='<%# Eval("To") %>' NavigateUrl='<%# Eval("ToId", "UserPage.aspx?Id={0}") %>'
                                SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="10%">
                        <ItemTemplate>
                            <asp:ImageButton ID="DeleteImageButton" runat="server" ImageUrl="~/Images/Icons/delete.png"
                                PostBackUrl='<%# Eval("MailId", "~/MailSentItems.aspx?DeleteMailId={0}") %>'
                                ToolTip="Delete" />
                            <asp:CheckBox ID="DeleteCheckBox" runat="server" Checked="false" />
                            <asp:HiddenField ID="MailIdHiddenField" runat="server" Value='<%# Eval("MailId") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <asp:Label ID="NoItemsLabel" runat="server" Text="<%$ Resources:Resource, MailSentItems_NoItemsLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                </EmptyDataTemplate>
            </asp:GridView>
            <br />
            
        </div>
        </div>

    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_MailGetSentMails" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>
